package cn.lili.modules.promotion.client;

import cn.lili.modules.constant.ServiceConstant;
import cn.lili.modules.promotion.entity.dos.Coupon;
import cn.lili.modules.promotion.fallback.CouponActivityFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author: ftyy
 * @date: 2022-01-13 18:11
 * @description: 优惠券活动Client
 */
@FeignClient(
        name = ServiceConstant.PROMOTION_SERVICE,
        contextId = "coupon",
        fallback = CouponActivityFallback.class)
public interface CouponClient {

    /**
     * 优惠券获取查询
     *
     * @param couponId 优惠券活动ID
     */
    @GetMapping("/feign/promotion/coupon/{couponId}")
    Coupon getById(@PathVariable String couponId);

}
